﻿@model Htinns.GatewayConsole.Models.Vote
@{
	ViewBag.Title = "客房网络服务使用情况调查问卷";
}
@using(Html.BeginForm()){
<div class="sign">
	<label>房间号:</label> 
	<input type="text"  name="RoomNo" id="RoomNo" class="inpt" />
	<label>姓名: </label>
	<input type="text"  name="Name" id="Name" class="inpt" />
</div>
<div class="questionnaire">
	<h2>@Model.Title</h2>	
	<div>
		<p class="pleased">
			<label><input type="radio" value="10"  id="v10" name="v10" checked="checked"  />
				@Model.VoteItems.SingleOrDefault(v=>v.Id==10).Content</label>
		</p>
		<p class="pleased">
			<label><input type="radio" value=""  id="noPleased" name="v10"  />
				不满意,还有这几方面需要改进：</label>
		</p>	
		<div id="yawp" style="display:none;">	
			<p>
				<strong>您使用的网络是</strong>
				<label>
					@{var lan = Model.VoteItems.SingleOrDefault(v => v.Id == 1);}
					@Html.RadioButton("net", lan.Id, true)@lan.Content
				</label>
				<label>
					@{var wlan = Model.VoteItems.SingleOrDefault(v => v.Id == 2);}
					@Html.RadioButton("net", wlan.Id, false)@wlan.Content
				</label>
			</p>
			<p>
				<strong>网速慢</strong>
				<label>
					@{var v3 = Model.VoteItems.SingleOrDefault(v => v.Id == 3);}
					<input type="checkbox" value="@v3.Id" name="@string.Format("v{0}",v3.Id)" id="@string.Format("v{0}",v3.Id)" />
					@v3.Content
				</label>
				<label>
					@{var v4 = Model.VoteItems.SingleOrDefault(v => v.Id == 4);}
					<input type="checkbox" value="@v4.Id" name="@string.Format("v{0}",v4.Id)" id="@string.Format("v{0}",v4.Id)" />
					@v4.Content
				</label>
				<label>
					@{var v5 = Model.VoteItems.SingleOrDefault(v => v.Id == 5);}
					<input type="checkbox" value="@v5.Id" name="@string.Format("v{0}",v5.Id)" id="@string.Format("v{0}",v5.Id)" />
					@v5.Content
				</label>
				<label>
					@{var v6 = Model.VoteItems.SingleOrDefault(v => v.Id == 6);}
					<input type="checkbox" value="@v6.Id" name="@string.Format("v{0}",v6.Id)" id="@string.Format("v{0}",v6.Id)" />
					@v6.Content
				</label>
				<label>
					@{var v7 = Model.VoteItems.SingleOrDefault(v => v.Id == 7);}
					<input type="checkbox" value="@v7.Id" name="@string.Format("v{0}",v7.Id)" id="@string.Format("v{0}",v7.Id)" />
					@v7.Content
				</label>
			</p>
			<p>
				<strong>网络不稳定</strong>
				<label>
					@{var v8 = Model.VoteItems.SingleOrDefault(v => v.Id == 8);}
					<input type="checkbox" value="@v8.Id" name="@string.Format("v{0}",v8.Id)" id="@string.Format("v{0}",v8.Id)" />
					@v8.Content
				</label>
				<label>
					@{var v9 = Model.VoteItems.SingleOrDefault(v => v.Id == 9);}
					<input type="checkbox" value="@v9.Id" name="@string.Format("v{0}",v9.Id)" id="@string.Format("v{0}",v9.Id)" />
					@v9.Content
				</label>			
			</p>			
		</div>
		<p>
			<strong>其他建议和反馈 </strong>				
			<input type="text" value="" id="reason" name="reason" class="reason"  />
		</p>
		<p>
			<input type="submit" value="提 交" class="btn" id="btnComplete"  />
		</p>
	</div>			
	<p class="backCon">
		<span style="display:none">
			@Html.ActionLink("调查结果", "QuestionnaireResult", "Home", new { id = ViewBag.HotelId }, new { @class = "lnkred" })
		</span>
		@Html.ActionLink("返回首页", "Index", "Home", new { id = ViewBag.HotelId }, new { @class="lnkred"})
	</p>	
</div>
@Html.Hidden("transactionId", Guid.NewGuid().ToString());
}
<script type="text/javascript">
<!--
	$(function () {
		$("#btnComplete").click(function (e) {
			var e = event || e;
			if ($.trim($("#RoomNo").val()) != "" && $.trim($("#Name").val()) != "") {
				return true;
			}
			alert("请填写房间号和姓名");
			return false;
		});

		$(".pleased").click(function (e) {
			if ($("#noPleased:checked").length > 0) {
				$("#yawp").show();
			} else {
				$("#yawp").hide();
			}
		});

	});

//-->
</script>

